﻿using log4net;
using log4net.Config;


namespace DFGK.WMS.Common.Tools
{
    public static class LogHelper
    {
        private static readonly ILog log = LogManager.GetLogger(typeof(LogHelper));

        static LogHelper()
        {
            XmlConfigurator.Configure(new FileInfo("Tools/log4net.config"));
        }
        public static void Debug(string message)
        {
            log.Debug(message);
        }

        public static void Info(string message)
        {
            log.Info(message);
        }

        public static void Warn(string message)
        {
            log.Warn(message);
        }

        public static void Error(string message, Exception ex = null)
        {
            log.Error(message, ex);
        }

        public static void Fatal(string message, Exception ex = null)
        {
            log.Fatal(message, ex);
        }
    }

}
